package org.putrpctorest.expression;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public abstract class AbstractExpression implements Expression {
	
	private String id;
	
	private Expression parent;
	
	private List<Expression> children = new ArrayList<Expression>();
	
	public AbstractExpression(String id) {
		this.id = id;
	}
	
	public Expression getParent() {
		return parent;
	}
	
	public List<Expression> getChildren() {
		return Collections.unmodifiableList(children);
	}
	
	public String getId() {
		return id;
	}
	
	public void addChild(Expression serviceRouter) {
		children.add(serviceRouter);
	}

	
	public abstract String getType();
	

}
